﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BlogComponent.aspx.cs" Inherits="VelocityCMS.Components.VelocityComponents.Views.BlogComponent" %>

<form action="<%= Url.Action("PageSave/TestPage1")%>" method="post">
<div class="ad">
    <asp:Literal ID="AdContent" runat="server" />
    <%//= Html.TextArea("AdContent")%>
    <h2>Content Groups</h2>
    <% foreach (var contentGroup in (IEnumerable<VelocityCMS.Models.ContentGroup>)(ViewData.ContentData))
       { %>
    
    <h3>ID:<%=contentGroup.ID %></h3>
    <div>GroupType:<%=contentGroup.GroupType%></div>
    <div>Author:<%=contentGroup.Author%></div>
    <div>ParentID:<%=contentGroup.ParentID%></div>
    
        <% foreach (var contentElement in (IEnumerable<VelocityCMS.Models.ContentElement>)(contentGroup.ContentElements))
        { %>
        <p>
            <h4>ID:<%=contentElement.ID%></h4>
            <div>GroupID:<%=contentElement.GroupID%></div>
            <div>ContentDate:<%=Html.TextBox("ContentDate" + contentElement.ID, contentElement.ContentDate)%></div>
            <div>ContentType:<%=contentElement.ContentType%></div>    
            <div>ContentData:<%=Html.TextArea("ContentData" + contentElement.ID, contentElement.ContentData)%></div>
        
        </p>
        <%  } %>
    <%  } %>
    <input type="submit" value="Save" />
</div>
</form>